<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<head>
    <meta charset="UTF-8">
    <title>聊天记录</title>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" type="text/css" th:href="@{/static/layim/layui/css/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/static/layui/css/layui.css}"/>
    <script th:inline="javascript">
        var basePath = [[${#httpServletRequest.getScheme() + "://" + #httpServletRequest.getServerName() + ":" + #httpServletRequest.getServerPort() + #httpServletRequest.getContextPath()}]];
        var userid = [[${session.userid}]];
    </script>
    <style>
        body .layim-chat-main {
            height: auto;
        }
    </style>
</head>
<body>
<div class="layim-chat-main">
    <ul id="LAY_view"></ul>
</div>
<div id="LAY_page" style="margin: 0 10px;"></div>
<textarea title="消息模版" id="LAY_tpl" style="display:none;">
{{# layui.each(d.data.data, function(index, item){
  if(item.id == d.data.uid){ }}
    <li class="layim-chat-mine">
        <div class="layim-chat-user">
            <img src="{{ item.avatar }}"><cite><i>{{ item.sendtime}}</i>{{ item.username }}</cite></div>
        <div class="layim-chat-text">{{ layui.layim.content(item.content) }}</div>
    </li>
  {{# } else { }}
    <li>
        <div class="layim-chat-user">
            <img src="{{ item.avatar }}"><cite>{{ item.username }}<i>{{ item.sendtime }}</i></cite>
        </div>
        <div class="layim-chat-text">{{ layui.layim.content(item.content) }}</div>
    </li>
  {{# }
}); }}
</textarea>
<script type="application/javascript" th:src="@{/static/layui/jquery.min.js}"></script>
<script type="application/javascript" th:src="@{/static/layim/layui/layui.js}"></script>
<script type="application/javascript" th:src="@{/static/js/admin/chatlog.js}"></script>
</body>
</html>
